模板库
# 获取 Chart 模板列表
获取模板库中可用的 Chart 模板以及模板支持的系统变量。
请求
GET /openapi/templates/charts
1
权限说明
调用该接口需要有效的 API Token。
返回说明
| 参数名 | 类型 | 描述 |
|---|---|---|
system_variables | []SystemVariable | 系统变量列表 |
chart_templates | []ChartTemplate | Chart 模板列表 |
SystemVariable 参数说明
| 参数名 | 类型 | 描述 |
|---|---|---|
key | string | 变量名称 |
description | string | 变量描述 |
ChartTemplate 参数说明
| 参数名 | 类型 | 描述 |
|---|---|---|
name | string | 模板名称 |
codehost_id | int | 代码源 ID |
owner | string | 代码库所属用户或组织 |
namespace | string | 代码库命名空间 |
repo | string | 代码库名称 |
path | string | 模板路径 |
branch | string | 分支名称 |
返回示例
{
"system_variables": [
{
"key": "$T-Project$",
"description": "项目名称"
}
],
"chart_templates": [
{
"name": "demo",
"codehost_id": 1,
"owner": "koderover",
"namespace": "charts",
"repo": "demo-chart",
"path": "charts/demo",
"branch": "main"
}
]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


